<template>
    <div class="son">
        子组件:{{ money }}
        <button @click="money++">money++</button>
        <div>
            {{ evenNums }}
        </div>
    </div>
</template>

<script setup>
import { computed } from 'vue'
const props = defineProps(['money', 'nums'])

const evenNums = computed(() => {
    return props.nums.filter(item => item % 2 === 0)
})




</script>

<style>
.son {
    border: 1px solid green;
    padding: 10px;
    width: 300px;
    height: 300px;
}
</style>